package com.spring.event.spring.service;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RunnerStart implements CommandLineRunner {

    @Resource
    private EventService eventService;

    @Override
    public void run(String... args) throws Exception {
        eventService.publishEvent();
    }
}
